<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>数组筛选</title>
	</head>
	<body>
		<script>
			var arr=[1,2,3,4,5,6,7,8];
			var newArr=[];
			for(var i=0;i<arr.length;i++){
				if(arr[i]>5){
					newArr.push(arr[i]);
				}
			}
			console.log(newArr)
		</script>
	</body>
</html>